import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    proxy: {
      '/adminURL': {
        target: 'https://ai-cxd.cn',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/adminURL/, '')
      }
    }
  },

  // 提交git的时候需要讲server注释掉
  define: {
    // enable hydration mismatch details in production build
    __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'true'
  }
})
